package Draw;

public class Draw {
    private int height;

    public void setHeight(int h) {
        this.height = h;
    }

    public void makeTriangle() {
        for (int i = 1; i <= height; i++) {
            for (int t = i; t < 10; t++) {
                System.out.print(" ");
            }
            for (int p = 0; p < 2 * (i - 1) + 1; p++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public void makeParallelogram() {
        for (int i = 1; i <= height; i++) {
            for (int t = i; t < 10; t++) {
                System.out.print(" ");
            }
            System.out.println("********");
        }
    }

    public void makeRectangle() {
        for (int i = 1; i <= height; i++) {
            System.out.print("      ");
            System.out.println("********");
        }
    }

    public void makeSquare() {
        for (int i = 1; i <= height; i++) {
            System.out.print("      ");
            for (int j = 1; j <= height; j++) {
                System.out.print("* ");
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        Draw shape = new Draw();
        shape.setHeight(5);
        shape.makeTriangle();
        shape.makeParallelogram();
        shape.makeRectangle();
        shape.makeSquare();
    }
}